<?php
class ActivityAction extends BaseAction
{
    public function index()
    {
    }

    /**
     * 获取当前柜台活动
     * @author Ice <iceinto@mallog.com.cn>
     */
    public function now()
    {
        $mid = $this->_get('mid', 'intval');
        $fid = $this->_get('fid', 'intval');
        $bid = $this->_get('bid', 'intval');
        if (empty($mid) || empty($fid) || empty($bid)) {
            $this->dataReturn('商场、楼层和品牌必须', 0, 0);
        } else {
            $BrandNewsModel = D('BrandNews');
            $new = $BrandNewsModel->getOneNewAll($mid, $fid, $bid, 'id,title,keyword,start_time,end_time,detail');
            $this->dataReturn($new, 0, 1);
        }
    }

    /**
     * 获取当前品牌在其他商场活动
     * @author Ice <iceinto@mallog.com.cn>
     */
    public function othermall()
    {
        $mid = $this->_get('mid', 'intval');
        $fid = $this->_get('fid', 'intval');
        $bid = $this->_get('bid', 'intval');
        if (empty($mid) || empty($fid) || empty($bid)) {
            $this->dataReturn('商场、楼层和品牌必须', 0, 0);
        } else {
            $BrandNewsModel = D('BrandNews');
            $news = $BrandNewsModel->getBrandOtherMallDis($mid, $fid, $bid);
            $this->dataReturn($news, 0, 1);
        }
    }
}

?>